<template>
  <div>
    <a-card>
      <a-row style="margin-bottom: 10px">
        <a-col :span="24"  style="display: flex;flex-direction: row-reverse">
          <a-button v-print="'#printReport'" type="primary">打印报表</a-button>
        </a-col>
      </a-row>
      <div id="printReport">
        <a-row>
          <a-col :span="6">单据编号：YZY20210325004</a-col>
        </a-row>
        <table border="1" cellpadding="2" cellspacing="0" bordercolor="#000" style="width: 100%">
          <tr>
            <th colspan="13">
              <div style="position: relative;text-align: center">
<!--                <img src="@/assets/reportIcon.png" width="100px" height="30px" style="position: absolute;left: 0px;top:-5px"/>-->
                <span>原材料入库单</span>
              </div>
            </th>
          </tr>
          <tr style="width: 100%" align="center">
            <th>日期</th>
            <th>订单编号</th>
            <th>供应商</th>
            <th>料号</th>
            <th>客户料号</th>
            <th>名称</th>
            <th width="200">规格</th>
            <th>伏数</th>
            <th>误差</th>
            <th>单位</th>
            <th>申购数量</th>
            <th>实收数量</th>
            <th width="100">备注</th>
          </tr>
          <tr v-for="item in reportData">
            <td>{{item.attr11}}</td>
            <td>{{item.attr1}}</td>
            <td>{{item.attr12}}</td>
            <td>{{item.attr2}}</td>
            <td>{{item.attr3}}</td>
            <td>{{item.attr4}}</td>
            <td>{{item.attr5}}</td>
            <td>{{item.attr6}}</td>
            <td>{{item.attr7}}</td>
            <td>{{item.attr8}}</td>
            <td>{{item.attr9}}</td>
            <td>{{item.attr10}}</td>
            <td></td>
          </tr>
          <tr>
            <td>合计</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td>{{total1}}</td>
            <td>{{total2}}</td>
            <td></td>
          </tr>
          <tr>
            <td colspan="4">核准：</td>
            <td colspan="4">制单：</td>
            <td colspan="5">收货人：</td>
          </tr>
          <tr>
            <td colspan="4">日期：</td>
            <td colspan="4">日期：</td>
            <td colspan="5">日期：</td>
          </tr>
        </table>
      </div>
    </a-card>
  </div>
</template>

<script>
export default {
  /** 原材料入库单 **/
  name: 'RawMaterialStorage',
  props:{
    reportData:{
      type:Array,
      default:()=>{[]}
    },
    total1:{
      type:Number,
      default:0
    },
    total2:{
      type:Number,
      default:0
    }
  },
  data(){
    return {
    }
  },
}
</script>

<style scoped>

</style>